package com.yunshang.shoppingmall.Methods;

import com.yunshang.shoppingmall.entity.UserNo;
import com.yunshang.shoppingmall.service.SysUserNoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.List;

@Component
public class UserNoMethods {

    @Autowired
    private SysUserNoService userNoService;
    private static SysUserNoService userNoService1;

    @PostConstruct
    public void init() {
        userNoService1 = userNoService;
    }

    public static List<UserNo> getUserNo() {
        return userNoService1.selectUserNoListUserNo();
    }

    public static UserNo insert(UserNo userNo)
    {
        userNoService1.insertSelective(userNo);
        return userNo;
    }

}
